// pid.h
#ifndef PID_H
#define PID_H

class PID {
public:
    PID(double kp, double ki, double kd, double out_min, double out_max);

    void reset();
    double compute(double setpoint, double measurement, double dt);

private:
    double Kp, Ki, Kd;
    double prev_error;
    double integral;
    double out_min, out_max;
};

#endif
